import torchvision.datasets

from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter

test_data = torchvision.datasets.CIFAR10("../../dataSet",train=False,
                                         transform=torchvision.transforms.ToTensor(),
                                         download=True)


test_loader = DataLoader(dataset = test_data,
                         batch_size= 64,
                         shuffle = True ,
                         num_workers = 5,
                         drop_last=False)
# e first img in test
img , target = test_data[0]
print(img.shape)
print(target)


writer = SummaryWriter("../logs")
step = 0
for data in test_loader:
    imgs , targets = data
    print(imgs.shape)
    print(targets)

    writer.add_images("dataLoader",imgs,step)
    step += 1

writer.close()


